<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>贪吃蛇小游戏</title>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>

	<body>
		<div>
		<!--<button onclick="stop()">暂停</button>
		<button onclick="start()">开始</button>-->
		</div>
		<div id="app">
		 <p class="cf">得分：<input type="text" id="fen" value="0" disabled/></p>
		 <button onclick="stopTime()">暂停</button>
		 <button onclick="start()">继续</button>
		</div>
		<script src="js/map.js"></script>
		<script src="js/food.js"></script>
		<script src="js/snake.js"></script>
		<script src="js/game.js"></script>
		<script>
			//			地图
			let map = new Map(20, 20);
			//          食物
			let food = new Food(2,8);
			//			蛇
			let snake = new Snake();
			//			游戏类
			let game = new Game(map, food, snake);
			function stopTime(){
			clearInterval(game.timer)
			}
			function start(){
			game.start()
			}
		</script>
	</body>

</html>